<template>
  <div id="Sponsor" @mouseover="showset" @mouseout="hideset" :style="{color:moddata.config.fontcolor}" class="mod">
    <div>
      <div class="con">
        <div class="title" v-show="moddata.config.titleshow"><span><i class="iconfont icon-people_fill"></i>&nbsp;{{moddata.config.title}}</span></div>
        <div class="text">
          <div class="organizer_logo">
            <div class="li" v-for="item in taskdata.Sponsor">
              <span class="img_center"><img :src="item.LogoSrc?item.LogoSrc:'/Areas/Template/Content/Design/images/timg.jpg'" :title="item.Name"/></span>
            </div>
          </div>
          <div class="organizer_li">
            <i>活动由</i>
            <span v-for="(item,index) in taskdata.Sponsor" class="zhuban"> {{index==0?"":"、" }} {{ item.Name }} </span>
            <i>主办</i>
          </div>
          <div class="organizer_contact">
            <a class="button" @click="contactus(true)">联系我们</a>
          </div>
        </div>
      </div>
    </div>
    <div class="mask" v-show="maskshow">
      <div class="settingbtn" @click="headset"><i class="el-icon-setting"></i> 设置</div>
      <div class="deletebtn" @click="deletemod"><i class="el-icon-delete"></i> 删除</div>
    </div>
    <div class="bg"></div> 
    <div class="callsponsor" v-show="contact">
      <div class="box">
        <p>如您对活动有疑问,请使用以下方式联系主办方</p>
        <i class="el-message-box__close el-icon-close" @click="contactus(false)"></i>
        <div class="content">
          <el-table
            :data="taskdata.Sponsor"
            stripe
            style="width: 100%">
            <el-table-column
              prop="Name"
              label="主办方">
            </el-table-column>
            <el-table-column
              prop="Phone"
              label="电话">
            </el-table-column>
            <el-table-column
              prop="Mail"
              label="邮箱">
            </el-table-column>
          </el-table>
        </div>
      </div> 
    </div> 
  </div>
</template>

<script>
import { Table , TableColumn } from 'element-ui'
  export default {
    props: ["moddata", "index" ,"taskdata"],
    data: function () {
      return {
        maskshow: false,
        contact:false
      }
    },
    methods: {
      showset: function () {
        this.maskshow = true;
      },
      hideset: function () {
        this.maskshow = false;
      },
      headset: function () {
        this.$store.commit({
          type: 'showsetbox',
          setMod: 'SetShowMod',
          index: this.index
        })
      },
      deletemod: function () {
        this.$store.dispatch('deleteMod', this.index)
      },
      contactus:function(a){
        this.contact = a;
      }
    }
  }
</script>

<style lang="less" scoped>
.callsponsor{
  background:rgba(0,0,0,.5);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  z-index:2001;
  .box{
    text-align: left;
    display: inline-block;
    vertical-align: middle;
    background-color: #fff;
    width: 720px;
    border-radius: 3px;
    font-size: 16px;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background:#fff;
    position:relative;
    p{
      padding:20px 20px 0;
    }
    .content{
      padding:20px;
    }
  }
  i{
    position:absolute;
    top:19px;
    right:20px;
    font-size:13px;
    color:#999;
  }
}
.callsponsor:after{
      content: "";
    display: inline-block;
    height: 100%;
    width: 0;
    vertical-align: middle;
}
  .default{
    .mod{
      position: relative;
      background: url("/Areas/Template/Content/Design/images/banner01.jpg") no-repeat center;
      background-size: cover;
      color: #fff;
    }
    .bg{
      position: absolute;
      left: 0;
      bottom: 0;
      right: 0;
      top: 0;
      z-index: 1;
      opacity: .6;
      background-color: #ff5304 !important;
    }
    .con{
      position:relative;
      z-index:2;
    }
    .text{
      text-align: center;
      position: relative;
      z-index: 2;
    }
    .organizer_logo{
      margin-bottom: 16px;
      .li{
        display: inline-block;
        width: 72px;
        height: 72px;
        overflow: hidden;
        border-radius: 50%;
        border: 3px solid rgba(255,255,255,0.3)!important;
        margin: 0 4px;
        .img_center{
          display:block;
          cursor: pointer;
          width: 72px;
          height: 72px;
          background: #fff;
          img{
            width: 100%;
            height: 100%;
            vertical-align: top;
          }
        }
      }
    }
    .organizer_li{
      position: relative;
      display: inline-block;
      margin-bottom:32px;
      i{
        font-size:14px;
        opacity: .8;
      }
      span{
        font-size:18px;
      }
    }
    .organizer_contact{
      .button{
        cursor:pointer;
        display: inline-block;
        border-width: 1px;
        border-style: solid;
        border-color: #ffffff;
        background: rgba(255,255,255,0.1)!important;
        font-size: 14px;
        padding: 10px 46px;
        border-radius: 2px;
        color: #ffffff;
        line-height: 24px;
      }
    }
  }
  .tradition{
    .organizer_logo{
      margin-bottom: 10px;
      .li{
        display: inline-block;
        width: 72px;
        height: 72px;
        overflow: hidden;
        border: 3px solid rgba(0,0,0,0.3)!important;
        margin: 0 4px;
        .img_center{
          display:block;
          cursor: pointer;
          width: 72px;
          height: 72px;
          background: #fff;
          img{
            width: 100%;
            height: 100%;
            vertical-align: top;
          }
        }
      }
    }
    .organizer_li{
      position: relative;
      display: inline-block;
      margin-bottom:12px;
      i{
        font-size:14px;
        opacity: .8;
      }
      span{
        font-size:14px;
        font-weight:600;
      }
    }
    .organizer_contact{
      .button{
        cursor:pointer;
        display: inline-block;
        border-width: 1px;
        border-style: solid;
        border-color: rgba(0,0,0,0.12);
        background: rgba(255,255,255,0.1)!important;
        font-size: 14px;
        padding: 8px 32px;
        border-radius: 2px;
        color: #000;
        line-height: 24px;
      }
    }
  }
</style>